Skip to content

Group hk-config with hk in shared Renovate preset - #390

Merged
gtbuchanan merged 1 commit into
mainfrom
issue-334-group-hk-config-renovate
Aug 11, 2026
Merged

Group hk-config with hk in shared Renovate preset#390
gtbuchanan merged 1 commit into
mainfrom
issue-334-group-hk-config-renovate

Conversation

@gtbuchanan

@gtbuchanan gtbuchanan commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Closes #334

@gtbuchanan/hk-config and hk are mutually coupled: Defaults.pkl is built against a specific hk Config/Builtins version, and a consumer's hk.pkl pins hk twice — the amends URL and the mise-installed binary. Splitting the bumps into separate PRs produces intermediate states that break in both directions (a newer hk binary rejecting the older preset; a newer preset targeting schema/hook behavior the pinned binary lacks), and both PRs edit hk.pkl, so whichever merges first forces the other to rebase.

This is live in gtbuchanan/dotfiles right now — #64 (hk v1.54.1) and #117 (hk-config v0.2.3) are both open and can't be merged independently.

Why the shared preset rather than each consuming repo

The dep only exists because the shared preset's hk-config customManager synthesizes it, so the rule governing how it's batched belongs alongside the manager that creates it. The coupling is a property of the two packages, not a per-repo update-policy preference — there's no consumer for whom separate PRs are the better outcome. Per-repo placement would also fail silently: a new hk-config adopter gets two unmergeable PRs and only discovers why at merge time.

Matcher choice

Matched on depName: hk-config (what the customManager's depNameTemplate emits — confirmed by the dotfiles PR titles/branches above), narrowed by matchDatasources: ["github-releases"] so it can't collide with a same-named npm dep in a consumer.

Note the issue proposed matchDepNames: ["@gtbuchanan/hk-config"], which would match nothing — hk-config is private to npm, so the scoped name never appears as a dep. matchSourceUrls is also unusable, as the issue called out: gtbuchanan/tooling resolves for @gtbuchanan/cli too, which must stay out of the hk group.

Caveats

  • Grouping does not enforce a compatible pair — Renovate still takes each dep's own latest. What it removes is the broken intermediate states and the hk.pkl conflict, and it lets one CI run validate the real combination.
  • Grouping also doesn't synchronize eligibility. The two deps sit on different release-age clocks (hk-config matches the own-packages minimumReleaseAge: "0 days" rule via gtbuchanan/tooling; hk keeps the global three days), so the renovate/hk branch can open with only the eligible member and pick up the other later. No minimumReleaseAge value fixes this — equalizing the threshold just inverts which member arrives first, since hk-config is normally released after hk. The lever is internalChecksFilter: "strict", a preset-wide change tracked separately.
  • A lone hk (or lone hk-config) update still ships on its own under the hk branch; they only combine when both are pending.
  • Inert in tooling itself, which imports Defaults.pkl by relative path and so has no hk-config dep to bump.

Validated with renovate-config-validator --strict against default.json and .github/renovate.json.

🤖 Generated with Claude Code

hk-config's Defaults.pkl is built against a specific hk Config/Builtins
version, and a consumer's hk.pkl pins hk twice (the amends URL and the
mise binary), so bumping either alone leaves a broken intermediate
state. Both bumps also edit hk.pkl, forcing the second PR to rebase.

Match on the depName the hk-config customManager emits rather than the
source URL — gtbuchanan/tooling also publishes @gtbuchanan/cli, which
must stay out of the hk group.

Closes #334
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The shared Renovate preset now groups hk-config updates with hk updates. AGENTS.md documents the dependency-name match and independent version resolution. A changeset records the preset change.

Changes

hk Renovate grouping

Layer / File(s) Summary
Configure and document hk update grouping
default.json, AGENTS.md, .changeset/group-hk-config-with-hk.md
The Renovate preset matches hk-config by dependency name and assigns it to the existing hk group. Documentation and a changeset record the grouping behavior.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes implement the linked issue by grouping hk-config with hk using the hk-config depName and github-releases datasource.
Out of Scope Changes check ✅ Passed The changes are limited to the shared Renovate preset configuration and its related changeset documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The description clearly explains the Renovate grouping change, its rationale, scope, caveats, and validation.
Title check ✅ Passed The title is concise, descriptive, within the preferred length, and accurately summarizes the main configuration change.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@default.json`:
- Around line 55-64: Preserve the three-day quarantine for hk-config by updating
the own-package rule that currently assigns it minimumReleaseAge "0 days";
exclude hk-config from that exception or restore its minimumReleaseAge to three
days, while leaving the hk grouping rule unchanged.
- Around line 55-64: Complete Termux validation for the hk dependency group
configuration identified by groupName "hk" and matchDepNames "hk-config": place
the Termux pkl wrapper on PATH, resolve the spawn pkl ENOENT failure, and rerun
all required validation checks before merging.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 3b292849-ba31-4fe3-9402-8ab4ba9983ee

📥 Commits

Reviewing files that changed from the base of the PR and between 78a2495 and 215a0d2.

📒 Files selected for processing (3)
  • .changeset/group-hk-config-with-hk.md
  • AGENTS.md
  • default.json
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • gtbuchanan/tooling (manual)
📜 Review details
🧰 Additional context used
📓 Path-based instructions (3)
.changeset/*.md

📄 CodeRabbit inference engine (AGENTS.md)

Every pull request must include a changeset listing affected packages and bump types, or an empty changeset for changes that do not affect published packages.

Files:

  • .changeset/group-hk-config-with-hk.md
**/*

📄 CodeRabbit inference engine (AGENTS.md)

Run pnpm build, pnpm test:slow, and pnpm test:e2e with --concurrency=1 on Termux to avoid out-of-memory failures.

Files:

  • AGENTS.md
  • default.json
default.json

📄 CodeRabbit inference engine (AGENTS.md)

Maintain the shared Renovate preset's supply-chain settings, including a three-day minimum release age, OSV vulnerability alerts, and dependency review-compatible license policy.

Files:

  • default.json
🧠 Learnings (1)
📚 Learning: 2026-06-17T04:54:26.509Z
Learnt from: gtbuchanan
Repo: gtbuchanan/tooling PR: 183
File: .changeset/mise-release-age-excludes.md:4-4
Timestamp: 2026-06-17T04:54:26.509Z
Learning: In the gtbuchanan/tooling repo, `.changeset/*.md` files should intentionally omit the Markdown H1 heading (MD041). Follow the changesets CLI convention: `frontmatter` followed by a blank line and then a plain summary text line. Do not prepend the summary with `# `, because the changesets CLI consumes that summary verbatim as the CHANGELOG entry; adding `# ` would introduce an unwanted stray H1 into the generated changelog. MD041 is not enforced by the repo’s `eslint-markdownlint` config for these files; any MD041 warnings for `.changeset/*.md` come from markdownlint-cli2 defaults rather than the repo’s own lint configuration.

Applied to files:

  • .changeset/group-hk-config-with-hk.md
🪛 markdownlint-cli2 (0.23.2)
.changeset/group-hk-config-with-hk.md

[warning] 4-4: First line in a file should be a top-level heading

(MD041, first-line-heading, first-line-h1)

🔇 Additional comments (2)
AGENTS.md (1)

450-463: LGTM!

.changeset/group-hk-config-with-hk.md (1)

1-5: LGTM!

Comment thread default.json
@gtbuchanan
gtbuchanan merged commit 8a3b44a into main Aug 11, 2026
11 checks passed
@gtbuchanan
gtbuchanan deleted the issue-334-group-hk-config-renovate branch August 11, 2026 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Group @gtbuchanan/hk-config with hk in the shared Renovate preset

1 participant